#include <stdio.h>
#include <stdlib.h>

//https://www.nowcoder.com/practice/cd052308a1c44a88ad00255f312c3e14?tpId=290&tqId=295431&ru=/exam/oj/ta&qru=/ta/beginner-programmers/question-ranking&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D290

typedef struct Arr {
    int n;
    int arr[0];
}Arr;

int Campares(const void *num1, const void *num2) {
    return *(int *)num2 - *(int *)num1;
}

int main() {
    int num = 0;
    scanf("%d", &num);
    Arr *arr = (Arr *) malloc(sizeof(Arr) + num * sizeof(int));
    if (arr == NULL) {
        perror("堆区空间开辟失败:");
    }
    arr->n = num;
    for (int i = 0; i < arr->n; i++) {
        scanf("%d", &arr->arr[i]);
    }
    qsort(arr->arr, arr->n, sizeof(arr->arr[0]), Campares);
    for (int i = 0; i < arr->n; i++) {
        printf("%d", arr->arr[i]);
    }
    return 0;
}